<template>
    <div v-show="!ishidden">
       
        <van-cell-group inset>
            <form action="#">
  <!-- 输入任意文本 -->
  <van-field v-model="text" label="名称" autocomplete="username" />
  <!-- 账号 -->
  <van-field v-model="number" type="number" label="账号" autocomplete="username" />
  <!-- 输入密码 -->
  <van-field v-model="password" autocomplete="current-password" type="password" label="密码" />
</form>
  <button @click="truehiddenvalue">确定</button>
  <button @click="truehidden">取消</button>
</van-cell-group>

    </div>
</template>


<style lang="scss" scoped>
    div{
        button{
            width: 50px;
            height: 30px;
            background-color: white;
            border-radius: 20%;
            margin: 20px;
        }
    }
</style>
<script>
import { ref } from 'vue';

export default{
   
  setup() {
    const text = ref('');
    const number = ref('');
    const password = ref('');

    return {  text,  number, password };
  },
  props:{
    ishidden:{
        default:true,
        type:Boolean
    }
  },
  methods:{
    truehidden(){
        this.$emit('truehidden');
    },
    truehiddenvalue(){
        this.$emit('truehiddenvalue',this.text);
    }
  }

}

</script>